package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.ActivityFaqColumnEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 咨询栏目 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-09-23 15:33:01
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ActivityFaqColumnQuery extends ActivityFaqColumnEntity implements Query<ActivityFaqColumnEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈Id查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 排序查询条件 */
	@JsonUnwrapped(prefix = "sortNo")
	private Condition<Integer> sortNoCondition;

    /** 栏目名称查询条件 */
	@JsonUnwrapped(prefix = "columnName")
	private Condition<String> columnNameCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ActivityFaqColumnQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ActivityFaqColumnQuery(ActivityFaqColumnEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ActivityFaqColumnQuery(ActivityFaqColumnQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.sortNoCondition != null) {
			this.sortNoCondition = other.sortNoCondition.copy();
		}
		if(other.columnNameCondition != null) {
			this.columnNameCondition = other.columnNameCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ActivityFaqColumnEntity> toQueryWrapper() {
		QueryWrapper<ActivityFaqColumnEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (sortNoCondition != null) {
			sortNoCondition.toWrapper(wrapper, COL_SORT_NO);
		}
		if (columnNameCondition != null) {
			columnNameCondition.toWrapper(wrapper, COL_COLUMN_NAME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈Id查询条件
	 * 
	 * @return busdIdCondition 商圈Id查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈Id查询条件
	 * 
	 * @return busdIdCondition 商圈Id查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈Id查询条件
	 * 
	 * @param busdIdCondition 商圈Id查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回排序查询条件
	 * 
	 * @return sortNoCondition 排序查询条件
	 */
	public Condition<Integer> sortNo() {
		this.sortNoCondition = new Condition<>();
		return this.sortNoCondition;
	}
	
	/**
	 * 获取排序查询条件
	 * 
	 * @return sortNoCondition 排序查询条件
	 */
	public Condition<Integer> getSortNoCondition() {
		return sortNoCondition;
	}

	/**
	 * 设置排序查询条件
	 * 
	 * @param sortNoCondition 排序查询条件
	 */
	public void setSortNoCondition(Condition<Integer> sortNoCondition) {
		this.sortNoCondition = sortNoCondition;
	}

	/**
	 * 构造并返回栏目名称查询条件
	 * 
	 * @return columnNameCondition 栏目名称查询条件
	 */
	public Condition<String> columnName() {
		this.columnNameCondition = new Condition<>();
		return this.columnNameCondition;
	}
	
	/**
	 * 获取栏目名称查询条件
	 * 
	 * @return columnNameCondition 栏目名称查询条件
	 */
	public Condition<String> getColumnNameCondition() {
		return columnNameCondition;
	}

	/**
	 * 设置栏目名称查询条件
	 * 
	 * @param columnNameCondition 栏目名称查询条件
	 */
	public void setColumnNameCondition(Condition<String> columnNameCondition) {
		this.columnNameCondition = columnNameCondition;
	}

}
